package cn.com.cifi.mars.service.impl;
import cn.com.cifi.mars.entity.VsNosGetin;
import cn.com.cifi.mars.mapper.mars.VsNosPayabledataviewformarsMapper;
import cn.com.cifi.mars.service.VsNosPayabledataviewformarsService;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 * VIEW 服务实现类
 * </p>
 *
 * @author JingYuanXiang
 * @since 2020-12-03
 */
@Service
public class VsNosPayabledataviewformarsServiceImpl extends ServiceImpl<VsNosPayabledataviewformarsMapper, VsNosGetin> implements VsNosPayabledataviewformarsService {

    @Autowired
    private VsNosPayabledataviewformarsMapper vsNosPayabledataviewformarsMapper;

    @DS("nos")
    @Transactional(propagation = Propagation.REQUIRES_NEW)
    @Override
    public List<VsNosGetin> selectByProjectId(String projectId) {
        return vsNosPayabledataviewformarsMapper.queryByProjectId(projectId);
    }

    @DS("nos")
    @Transactional(propagation = Propagation.REQUIRES_NEW)
    @Override
    public List<VsNosGetin> selectByStageIdList(String stageId) {
        return vsNosPayabledataviewformarsMapper.queryByStageId(stageId);
    }
}
